/**
 * @Author: LongTao
 * @program: day06_longtao_mybatis_1917JA_20201217
 * @description: dao层
 * @create: 2020-12-17 11:28
 * @version:1.0
 **/
package com.longtao.smbms.mapper;

import com.longtao.smbms.pojo.Role;
import com.longtao.smbms.pojo.User;
import com.longtao.smbms.pojo.User2;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
public interface Mapper {
    /**
     * 根据条件查询用户表的所有信息
     * @param userName
     * @param userPassword
     * @return
     * @throws Exception
     */
    public List<User> queryAllUserList(@Param("userName") String userName, @Param("userPassword") String userPassword) throws Exception;

    /**
     * 一对多查询
     * @param id
     * @return
     * @throws Exception
     */
    public List<Role> queryAllRoleList(String id) throws Exception;

    /**
     * 根据map查询
     * @param map
     * @return
     * @throws Exception
     */
    public List<User2> queryAllUserList2(Map<String,Object> map)throws Exception;

    /**
     * map包含对象以及ArrayList集合
     * @param map
     * @return
     * @throws Exception
     */
    public List<User2> queryAllUserListMap(Map<String,Object> map) throws Exception;

    /**
     * 修改
     * @param user2
     * @return
     * @throws Exception
     */
    public int updateUser(User2 user2) throws Exception;
}